package com.netease.o.a;

import com.netease.pris.atom.u;
import java.net.URLEncoder;
import org.json.JSONArray;
import org.json.JSONObject;

public class c
{
  private static final String j = "docid";
  private static final String k = "body";
  private static final String l = "title";
  private static final String m = "replyBoard";
  private static final String n = "source";
  private static final String o = "replyCount";
  private static final String p = "hasNext";
  private static final String q = "ptime";
  private static final String r = "img";
  private static final String s = "ref";
  private static final String t = "alt";
  private static final String u = "src";
  String a;
  String b;
  String c;
  String d;
  String e;
  int f;
  boolean g;
  b[] h;
  String i;

  public c(JSONObject paramJSONObject)
  {
    this.a = paramJSONObject.optString("docid");
    this.b = paramJSONObject.optString("body");
    this.c = paramJSONObject.optString("title");
    this.d = paramJSONObject.optString("replyBoard");
    this.f = paramJSONObject.optInt("replyCount");
    this.e = paramJSONObject.optString("source");
    this.g = paramJSONObject.optBoolean("hasNext");
    JSONArray localJSONArray = paramJSONObject.optJSONArray("img");
    if (localJSONArray != null)
    {
      this.h = new b[localJSONArray.length()];
      for (int i1 = 0; i1 < this.h.length; i1++)
        this.h[i1] = new b(localJSONArray.optJSONObject(i1));
    }
    this.i = paramJSONObject.optString("ptime");
  }

  public String a()
  {
    return this.a;
  }

  public String b()
  {
    return this.b;
  }

  public String c()
  {
    return this.c;
  }

  public String d()
  {
    return this.d;
  }

  public String e()
  {
    return this.e;
  }

  public int f()
  {
    return this.f;
  }

  public boolean g()
  {
    return this.g;
  }

  public b[] h()
  {
    return this.h;
  }

  public String i()
  {
    return this.i;
  }

  public u j()
  {
    u localu = new u();
    localu.h(true);
    localu.q(this.a);
    localu.r(this.c);
    if (this.h != null)
      for (int i1 = 0; i1 < this.h.length; i1++)
      {
        String str1 = this.b;
        String str2 = this.h[i1].a();
        StringBuilder localStringBuilder = new StringBuilder().append("<div style=\"width:145px;height:138px;float:right;clear:right;overflow:hidden;\">");
        Object[] arrayOfObject = new Object[2];
        arrayOfObject[0] = ("file:///android_asset/img?id=" + (i1 + 1) + "&url=" + URLEncoder.encode(this.h[i1].c()));
        arrayOfObject[1] = Integer.valueOf(i1 + 1);
        this.b = str1.replace(str2, String.format("<img src='%s' id='%d'/>", arrayOfObject) + "</div>");
      }
    localu.j(this.b);
    return localu;
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.o.a.c
 * JD-Core Version:    0.6.0
 */